package com.hk.cafe.control;

import com.hk.action.Action;
import com.hk.action.ActionFactory;
import com.hk.login.AdminAction;
import com.hk.login.CheckIdAction;
import com.hk.login.LeftUpdateAction;
import com.hk.login.LoginAction;
import com.hk.login.LogoutAction;
import com.hk.login.ReLoginAction;
import com.hk.login.Register;
import com.hk.login.RegisterAction;
import com.hk.login.UpdateAction;
import com.hk.login.UserModAction;

public class LoginActionFactory implements ActionFactory{
private static LoginActionFactory factory;
	
	public static LoginActionFactory getInstance(){
		if(factory==null){
			factory=new LoginActionFactory();
		}
		return factory;
	}
	
	public Action getAction(String command){
		Action action=null;
			if(command.equalsIgnoreCase("login")){
		
			action=new LoginAction();
		}else if(command.equalsIgnoreCase("registergo")){
		
			action=new RegisterAction();
		}else if(command.equalsIgnoreCase("register")){
		
			action=new Register();
		}else if(command.equalsIgnoreCase("logout")){
		
			action=new LogoutAction();
		}else if(command.equalsIgnoreCase("relogin")){
		
			action=new ReLoginAction();
		}else if(command.equalsIgnoreCase("checkid")){
		
			action=new CheckIdAction();
		}else if(command.equalsIgnoreCase("modinfo")){
		
			action=new UserModAction();
		}else if(command.equalsIgnoreCase("admin")){
		
			action=new AdminAction();
		}else if(command.equalsIgnoreCase("update")){
		
			action=new UpdateAction();
		}else if(command.equalsIgnoreCase("leftupdate")){
		
			action=new LeftUpdateAction();
		}
		
		return action;
	}//
}
